package com.test;


import com.model.user;
import com.service.userService;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class lesson {

    @Test
    public void test1() throws Exception{

        ApplicationContext context = new ClassPathXmlApplicationContext("bean2.xml");

        userService service = (userService) context.getBean("userService");

        user user1 = new user();
        user1.setUserName("ahah");
        user1.setPassword("sshsh");
        service.add(user1);
    }
}
